package com.authority.framework.web.service.impl;

import com.authority.framework.base.service.impl.BaseServiceImpl;
import com.authority.framework.web.domain.SysPostEntity;
import com.authority.framework.web.service.SysPostService;
import org.beetl.sql.core.SQLManager;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @program: authority
 * @description: 岗位 impl层
 * @author: Mr.Yan
 * @create: 2018-11-15 13:47
 **/
@Service
@Transactional
public class SysPostServiceImpl extends BaseServiceImpl<SysPostEntity> implements SysPostService {

	@Autowired
	private SQLManager sqlManager;

	//  参数
	private Map<String,String> paramMap = null;

	/**
	 * 查询用户的岗位信息
	 * @param userId
	 * @return
	 */
	@Override
	public List<SysPostEntity> findListByUserId(Integer userId) {
		paramMap = new HashMap<>();
		paramMap.put("userId",userId.toString());
		return sqlManager.select("system/SqlPostSql.findListByUserId",SysPostEntity.class,paramMap);
	}


}
